package main

import "fmt"

func main() {
	arr := [...]int{1, 2, 3, 4, 5, 6}
	fmt.Println("Arr")
	for k, v := range arr {
		fmt.Println(k, "=>", v)
	}
	m := map[string]string{
		"a": "b",
		"b": "c",
		"f": "g",
		"m": "n",
		"o": "p",
	}
	fmt.Println("Map")
	for k, v := range m {
		fmt.Println(k, "=>", v)
	}
	var str string
	str = "hello 你好吗"
	fmt.Println("Str")
	for k, v := range str {
		fmt.Println(k, "=>", v)
	}
	c := make(chan int)
	fmt.Println("Channel")
	go func() {
		c <- 1
		c <- 2
		c <- 3
		close(c)
	}()
	for v := range c {
		fmt.Println(v)
	}
	_m := map[string]int{
		"a": 100,
		"b": 200,
		"c": 300,
	}
	fmt.Println("Value")
	for _, value := range _m {
		fmt.Println(value)
	}
	fmt.Println("Key")
	for key, _ := range _m {
		fmt.Println(key)
	}
}
